A wireless fidelity (Wireless Fidelity, WiFi) technology is a generic term of technologies that support local area wireless network communication based on the IEEE 802.11 protocol family. A system mainly includes a station (STAtion, STA) and an access point (Access Point, AP). The STA and the AP communicate by using an air interface, that is, wireless transmission. The AP connects the STA to a local area network in the Internet, so that the STA can access the Internet.
There are two frequency bands commonly used for the WiFi: one is a 2.4 G frequency band, and the other is a 5 G frequency band. In an existing communication method, dual-band AP switching is completed by means of hard handover. For example, when a STA is currently connected to a 2.5 G AP, the currently connected 2.5 G AP needs to be first manually disconnected, and then a 5 G AP is manually selected and connected. Therefore, a switching manner is quite inflexible.